package fr.mywiki.test.utils;

import java.rmi.RemoteException;

import javax.servlet.http.HttpSession;

import fr.mywiki.business.account.AccountLite;
import fr.mywiki.business.login.LoginManager;
import fr.mywiki.test.utils.factory.AccountFactory;

/**
 * This class provides several methods that enable the connection of any user
 * within the application during the tests.
 */
public class ConnectFactory {
	/** Logs the admin user on */
	public static void loginAdminUser(HttpSession session) throws RemoteException {
		AccountLite account = AccountFactory.getAnyAccount();
		
		LoginManager.initSession(session, account);
	}
}
